package com.shengqin.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 成绩
 * </p>
 *
 * @author Rui.Zhou
 * @since 2023-12-11
 */
@TableName("t_test_result")
@Schema(name = "TestResult对象", description = "成绩")
@Data
public class TestResult implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "所属年级")
    private Integer gradeId;

    @Schema(description = "班级名称")
    private String classesName;

    @Schema(description = "学籍号")
    @ExcelProperty("学籍号")
    private String studyCode;

    @Schema(description = "姓名")
    @ExcelProperty("姓名")
    private String name;

    @Schema(description = "性别")
    @ExcelProperty("性别")
    private String sex;

    @Schema(description = "身份证号")
    private String idNumber;

    @Schema(description = "民族")
    private String nation;

    @Schema(description = "生日")
    private LocalDate birthday;

    @Schema(description = "学生来源")
    private String fromSource;

    @Schema(description = "家庭地址")
    private String address;

    @Schema(description = "头像")
    private String avatarUrl;

    @Schema(description = "IC卡号")
    private String cardNo;

    @Schema(description = "所属项目")
    private String prjCode;

    @Schema(description = "项目名称")
    private String prjName;

    @Schema(description = "成绩")
    @ExcelProperty("测试成绩")
    private String result;

    @Schema(description = "得分")
    private BigDecimal score;

    @Schema(description = "附加分")
    private BigDecimal extraScore;

    @Schema(description = "标准")
    private BigDecimal standardScore;

    @Schema(description = "等级")
    private String level;

    private BigDecimal finalScore;
    private String cameraId;
    private String resultType;

    @Schema(description = "测试时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "设备编号")
    @ExcelProperty("设备编号")
    private String deviceNo;

    @Schema(description = "测试计划ID")
    private Integer planId;

    @Schema(description = "学年")
    private String schoolYear;

    @Schema(description = "所属学校")
    private Integer schoolId;

    @Schema(description = "开始时间")
    private String testEndTime;

    @Schema(description = "结束时间")
    private String testStartTime;

    private Long resultRecordId;

    @Schema(description = "所属学校")
    @TableField(exist = false)
    private String schoolName;
    @TableField(exist = false)
    private String videoUrl;

    @TableField(exist = false)
    @Schema(description ="测试进度")
    private Double testProcess;
    @TableField(exist = false)
    @Schema(description = "单项指标")
    private BigDecimal prjWeight;
}
